export default function format(res) {
    const profile = res.profile
    const account = res.account
    if(!account || !profile) {
        return {}
    }
    const userInfo = {
        nickname: profile.nickname,
        signature: profile.signature,
        avatarUrl: profile.avatarUrl,
        backgroundUrl: profile.backgroundUrl,
        userId: profile.userId,
        id: account.id,
    }
    return userInfo
}